home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / fontconfig.preinst < prev    next >
Encoding:
Text File  |  2007-01-05  |  991 b   |  44 lines

  1. #! /bin/sh
  2.  
  3. set -e
  4.  
  5. # Prepare to move a conffile without triggering a dpkg question
  6. prep_mv_conffile() {
  7.     CONFFILE="$1"
  8.  
  9.     if [ -e "$CONFFILE" ]; then
  10.         md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
  11.         old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status`"
  12.         if [ "$md5sum" = "$old_md5sum" ]; then
  13.             rm -f "$CONFFILE"
  14.         fi
  15.     fi
  16. }
  17.  
  18. FILES="\
  19. /etc/fonts/fonts.conf \
  20. /etc/fonts/fonts.dtd \
  21. /etc/fonts/conf.d/autohint.conf \
  22. /etc/fonts/conf.d/no-bitmaps.conf \
  23. /etc/fonts/conf.d/no-sub-pixel.conf \
  24. /etc/fonts/conf.d/sub-pixel.conf \
  25. /etc/fonts/conf.d/unhinted.conf \
  26. /etc/fonts/conf.d/yes-bitmaps.conf"
  27.  
  28. #
  29. # This marks when the config files moved from this package
  30. # to the fontconfig-config package
  31. #
  32. NEWVERSION=2.3.2-2
  33.  
  34. case "$1" in
  35. install|upgrade)
  36.   if [ -n "$2" ] && dpkg --compare-versions "$2" lt "$NEWVERSION"; then
  37.     for FILE in $FILES; do
  38.       prep_mv_conffile $FILE
  39.     done
  40.   fi
  41. esac
  42.  
  43.  
  44.